#导入请求模块
import requests

#准备视频网址
#url = 'https://v26-web.douyinvod.com/3d97e4e4384e4af45dd9ad84a6c699d7/65410319/video/tos/cn/tos-cn-ve-15c001-alinc2/ef2b5f7ef87f47fbb178f38cf2ddbbf6/?a=6383&ch=11&cr=3&dr=0&lr=all&cd=0|0|0|3&cv=1&br=1085&bt=1085&cs=0&ds=6&ft=GN7rKGVVywfZRzm80mo~xj7ScoAp-OU~EvrK.p_njto0g3&mime_type=video_mp4&qs=0&rc=ZDU0MzU7Ozk4ZjhkO2k3O0Bpam1sNDw6ZjhwZDMzNGkzM0AtY18wMTNjNWAxLmA2NC4vYSNjMzJkcjRnaGRgLS1kLWFzcw==&btag=e00008000&dy_q=1698755844&l=20231031203723B3E228CCBDC271102C71'
#url = 'https://v3-web.douyinvod.com/b7799321a8064a185baac349d8020d87/654109df/video/tos/cn/tos-cn-ve-15c001-alinc2/o4Of97UClQDVA9Aa0BPekBqDImnEzAAYxgb6Ql/?a=6383&ch=11&cr=3&dr=0&lr=all&cd=0|0|0|3&cv=1&br=158&bt=158&cs=0&ds=3&ft=GN7rKGVVywfZRzm80mo~xj7ScoApBuU~EvrK.p_njto0g3&mime_type=video_mp4&qs=1&rc=Zmk4ZTo7Omc7NzU7aThmPEBpMzpmdmc6ZmZ1bjMzNGkzM0BeNTQvYy9fNi4xX2BfMTNiYSMybGpgcjRfaXNgLS1kLTBzcw==&btag=e00008000&dy_q=1698757576&feature_id=46a7bb47b4fd1280f3d3825bf2b29388&l=2023103121061688F9F75F5B219917E6E4'
#url = ''

#请求网址拿到数据
res = requests.get(url)

#响应状态码  404-请求失败  200-请求成功
print(res.status_code)

#视频数据  均已二进制形式存放
print(res.content)

#保存视频到电脑  打开方式 1，读  2，写
#open('文件名','打开方式')
open('励志语句.mp4','wb').write(res.content)